<html>
<head>
<title>AutoCrop</title>
   <link rel="stylesheet" type="text/css" href="../../avisynth.css">
<!--
Automatically generated, don't change:
$Id: autocrop.htm,v 1.1 2004/10/17 16:30:51 alex_e_basta Exp $ 
-->
</head>
<body>
<h1>AutoCrop</h1>
<h2>Sommario</h2>
<b>author:</b> Glenn Bussell
<br><b>version:</b> 1.1<br>
<b>download:</b>  <a href="http://www.videofringe.com/autocrop">http://www.videofringe.com/autocrop</a><br>
<b>category:</b> Broadcast Video Plugins<br>
<b>requirements:</b> YV12 &amp; YUY2 Colorspace
<hr>
<h3>Descrizione</h3>
<p>AutoCrop &egrave; un filtro di AVISynth che automaticamente croppa i bordi 
  neri di un clip. Opera sia in modo preview (dove sovrappone le informazioni 
  per il cropping consigliato) , che in modo cropping col quale croppa realmente 
  il clip. Pu&ograve; inoltre garantire che larghezza ed altezza siano multipli 
  di un valore specificato in modo tale che il clip croppato possa essere passato 
  senza problemi al compressore video.</p>
<h3> Uso</h3>
<p>AutoCrop accetta 10 parametri tutti opzionali sicch&eacute; basta AutoCrop() 
  per abituarsi a come lavora il filtro. I parametri possono essere specificati 
  come posizionali o per nome. Suggerisco di specificarli per nome visto che sono 
  tanti!</p>
<p>Orine dei parametri.</p>
<p><code>AutoCrop</code> (<var>&quot;mode&quot;, &quot;wMultOf&quot;,
&quot;hMultOf&quot;, &quot;leftAdd&quot;, &quot;rightAdd&quot;,
&quot;topAdd&quot;, &quot;bottomAdd&quot;, &quot;threshold&quot;,
&quot;samples&quot;, &quot;aspect&quot;</var>)</p>
<h3>Sintassi</h3>
<p><var>mode</var> - Intero - default 1</p>
<p>0 - Crop - Croppa l'immagine<br>
  1 - Preview - Le informazioni di cropping consigliate vengono sovrapposte al 
  clip, incluso un comando di crop che pu&ograve; essere usato al posto di AutoCrop.<br>
  2 - Log - Crea un logs dei parametri di cropping nel file &quot;AutoCrop.log&quot; 
  nella directory currente.</p>
<p><var>wMultOf</var> - Intero- default 4</p>
<p>Garantisce che la larghezza sia un multiplo di un valore specificato in modo 
  tale che il clip croppato possa essere passato senza problemi al compressore 
  video.</p>
<p><var>hMultOf</var> - Intero - default 2</p>
<p>Idem per l'altezza.</p>
<p><var>leftAdd</var> - Intero - default 0</p>
<p>Forza autocrop a croppare ulteriori <var>leftAdd</var> pixels dopo aver completato 
  la auto individuazione. Si pu&ograve; usare questa opzione congiuntamente a 
  <var>wMultOf</var>. Utile per croppare le linee di pessima qualit&agrave; a 
  lato delle catture VHS.</p>
<p><var>rightAdd</var> - Intero - default 0</p>
<p>Come sopra riferito al lato destro.</p>
<p><var>topAdd</var> - Intero - default 0</p>
<p>Forza autocrop a croppare ulteriori <var>topAdd</var> pixels dopo aver completato 
  la auto individuazione. Si pu&ograve; usare questa opzione congiuntamente a 
  <var>hMultOf</var>. Utile per croppare le linee di pessima qualit&agrave; in 
  cima alle catture VHS.</p>
<p><var>bottomAdd</var> - Intero - default 0</p>
<p>Come sopra riferito al lato inferiore.</p>
<p><var>threshold</var> - Intero (0-255) - default 40</p>
<p>Threshold &egrave; la luminanza media che una riga deve avere prima di essere 
  considerata non nera.</p>
<p><var>samples</var> - Intero - default 10</p>
<p>Numero di frames da esaminare per determinare le informazioni di cropping. 
  Questo influenza direttamente il tempo di inizio lavoro del filtro. In generale 
  10 sembra essere tanto, se questo ritardo vi infastidisce, abbassatelo.</p>
<p><var>aspect</var> - Float - default 0 - L'aspetto &egrave; ignorato.</p>
<p>-1 - Mantiene l'aspect ratio del clip<br>
  0 - L'aspetto &egrave; ignorato.<br>
  &gt;0 - L'aspect ratio sar&agrave; impostato a questo valore. Ad esempio per 
  una aspect ratio 4:3 si deve passare<br>
  4.0/3.0 o 1.33333333333. Notare che 4/3 non funziona e che .0 &egrave; richiesto 
  per dire ad AviSynth che il valore &egrave; float.</p>
<h3>Uso consigliato</h3>
<p>Suggerisco vivamente di usare il modo preview prima di sottomettere un crop 
  particulare . Vale la pena di notare che copiare i settaggi suggeriti nel comando 
  di crop standard di AviSynth &egrave; pi&ugrave; veloce che usare AutoCrop con<var> 
  mode</var> = 0.</p>
<h3>Sorgenti</h3>
<p>I sorgenti sono inclusi nella distribuzione.</p>
<h3>Futuri miglioramenti pianificati</h3>
<p>Blanking Mode</p>
<hr>

<p><font size="-1">Copyright (c) 2002 Glenn Bussell. All rights reserved.<br>
  glenn@videofringe.com </font></p>
<p><font size="-1">This file is subject to the terms of the GNU General Public 
  License as published by the Free Software Foundation. A copy of this license is
included with this software distribution in the file COPYING. If you do not have a copy, you may obtain a copy by writing to the Free
Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.</font></p>
<p><font size="-1">This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.</font></p>

<p><font size="-1"><kbd>$Date: 2004/10/17 16:30:51 $</kbd></font></p>

</body>
</html>

<!---
new version:

INTRODUCTION

AutoCrop is an AVISynth filter that automatically crops the black borders from a clip. It
operates in either preview mode where it overlays the recommended cropping information on
the existing clip, or cropping mode where it really crops the clip. It can also ensure
width and height are multiples of specified numbers so the cropped clip can be passed to
the video compressor of your choice without problems.

The latest version of this filter is available at

http://www.videofringe.com/autocrop

CHANGES

Added ability to set a range of frames to sample for cropping information.

Reduced default number of frames to sample to 5.

Reduced default threshold to 30, this change and the one above should perform give equal
or better performance for DVD sources much quicker.

Minor documentation updates.

This version of AutoCrop is compiled for AviSynth 2.5. It will not work with any of the
2.0 releases. If you need to use AviSynth 2.0 please download version 0.3 of this filter
from
http://www.videofringe.com/autocrop


USAGE

AutoCrop takes 12 parameters but they are all optional so you can just do AutoCrop() to
get a feel for how the filter works. Parameters can either be specified in order or by
name. I suggest specifying by name as there is a lot of parameters!

Parameter order follows.

AutoCrop(mode,wMultOf,hMultOf,leftAdd,rightAdd,topAdd,bottomAdd,threshold,samples,samplest
artframe,sampleendframe,aspect)

SYNTAX

mode - Integer - default 1

0 - Crop - Crops the image
1 - Preview - Suggested cropping information is overlayed on the existing clip, including
a crop command that you can use to replace AutoCrop with.
2 - Log - Logs the cropping parameters to the file "AutoCrop.log" in the current
directory.

wMultOf - Integer - default 4

Ensures that the width of the cropped clip will be a multiple of the number specified. Use
this to ensure that clip is a valid for whatever codec you are going to compress with.

hMultOf - Integer - default 2

As above but for height

leftAdd - Integer - default 0

Forces autocrop to crop and additional 'leftAdd' pixels after it completes auto detection.
You can use this option in conjunction with wMultOf. Useful for cropping out bad quality
lines on the side of VHS captures.

rightAdd - Integer - default 0

See above but for the right.

topAdd - Integer - default 0

Forces autocrop to crop and additional 'topAdd' pixels after it completes auto detection.
You can use this option in conjunction with hMultOf. Useful for cropping out bad quality
lines on the top of VHS captures.

bottomAdd - Integer - default 0

See above but for the bottom.

threshold - Integer (0-255) - default 30

Threshold is the average luminance a line must have before it's considered non blank. For
DVD sources values as low as 20 should work reliably. For VHS sources raising the value
maybe neccessary.

samples - Integer - default 5

The number of frames to examine when determining the cropping information. This directly
affects the startup time of the filter. This number dramatically effects the amount of
time taken for the filter to startup. Increasing the number to 10 will basically double
the startup time.

samplestartframe - Integer - default 0 (first frame)

Sets the first frame to be looked at when determining the cropping parameters.

sampleendframe - Integer - default -1 (last frame)

Sets the last frame to be looked at when determining the cropping parameters. If you want
to take the cropping information from a single frame set samplestartframe and
sampleendframe to the same number and samples to be 1

aspect - Float - default 0 - Aspect is ignored

-1 - Maintain aspect ratio of the source clip
 0 - Aspect is ignored
>0 - Aspect ratio will be set to this. For example for a 4:3 aspect ratio you would pass
4.0/3.0 or 1.33333333333. Note 4/3 won't work the .0 is need to tell AVISynth the value is
a float.

RECOMMENDED USE

I strongly suggest using the preview mode before committing to a particular crop.

SOURCE

Source is included in the distribution.

PLANNED FUTURE ENHANCEMENTS

Blanking Mode


-->
